/*
 * 代号：凤凰
 * http://www.jphenix.org
 * 2022年9月2日
 * V4.0
 */
package jakarta.servlet.http;

import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Map;

import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;

/**
 * 【假类】用于辅助框架包编译通过
 * 
 * 2024-08-16 按照Tomcat10.1.19构建的假类
 * 
 * @author MBG
 * 2022年9月2日
 */
public interface HttpServletRequest extends ServletRequest {

    String getAuthType();
    Cookie[] getCookies();
    long getDateHeader(String name);
    String getHeader(String name);
    Enumeration<String> getHeaders(String name);
    Enumeration<String> getHeaderNames();
    int getIntHeader(String name);
    default HttpServletMapping getHttpServletMapping() {
        return new HttpServletMapping() {
            @Override
            public String getMatchValue() {
                return "";
            }
            @Override
            public String getPattern() {
                return "";
            }
            @Override
            public String getServletName() {
                return "";
            }
            @Override
            public MappingMatch getMappingMatch() {
                return null;
            }
        };
    }
    String getMethod();
    String getPathInfo();
    String getPathTranslated();
    default PushBuilder newPushBuilder() {
        return null;
    }
    String getContextPath();
    String getQueryString();
    String getRemoteUser();
    boolean isUserInRole(String role);
    java.security.Principal getUserPrincipal();
    String getRequestedSessionId();
    String getRequestURI();
    StringBuffer getRequestURL();
    String getServletPath();
    HttpSession getSession(boolean create);
    HttpSession getSession();
    String changeSessionId();
    boolean isRequestedSessionIdValid();
    boolean isRequestedSessionIdFromCookie();
    boolean isRequestedSessionIdFromURL();
    boolean authenticate(HttpServletResponse response) throws IOException, ServletException;
    void login(String username, String password) throws ServletException;
    void logout() throws ServletException;
    Collection<Part> getParts() throws IOException, ServletException;
    Part getPart(String name) throws IOException, ServletException;
    <T extends HttpUpgradeHandler> T upgrade(Class<T> httpUpgradeHandlerClass)
            throws IOException, ServletException;
    default Map<String,String> getTrailerFields() {
        return Collections.emptyMap();
    }
    default boolean isTrailerFieldsReady() {
        return true;
    }
}






